import vue from 'vue'
import VueRouter from 'vue-router'
vue.use(VueRouter)
import login from '../components/login'
import main from '../components/main'
import approve from '../components/content/approve'
import library from '../components/content/library'



export default new VueRouter({

    routes: [
        {
            path: "/",
            redirect: '/login',
            name:'index'

        },
        {
            path: "/login",
            component: login,
        },
        {
            path: "/index",
            component: main,
            children:[
                {path:"/",
                redirect:"/approve"},
                {
                    path:"/approve",
                    component:approve
                }, {
                    path: "/library",
                    component: library
                }
            ]
            

        },

    ],
    mode:'history'

})